package org.cainiao.io.nio.buffer.util;

import lombok.experimental.UtilityClass;

import java.nio.Buffer;

@UtilityClass
public class BufferUtil {

    // Print info about a buffer
    public static void println(Buffer buffer) {
        System.out.println("pos=" + buffer.position()
            + ", limit=" + buffer.limit()
            + ", capacity=" + buffer.capacity()
            + ": '" + buffer + "'");
    }

}
